package com.prs.crm.domain.oa;

import java.util.Date;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.doc.Document;
import com.prs.crm.domain.hr.Person;

@Entity
@Table(name="oa_schedule")
public class Schedule extends BaseEntity{
	
	private static final long serialVersionUID = 1L;
	
	@Id@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	@ManyToOne
	private Person exePerson;
	@ManyToOne
	private Person allotPerson;
	private Date beginTime;
	private Date endTime;
	private String attach;
	private String level;
	@Lob
	private String content;
	private String title;
	private String awoke;
	private String state;
	private Date creattime;
	
	@OneToMany(fetch=FetchType.LAZY,mappedBy="oaSchedule")
	private Set<Document> docs;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Person getExePerson() {
		return exePerson;
	}
	public void setExePerson(Person exePerson) {
		this.exePerson = exePerson;
	}
	public Person getAllotPerson() {
		return allotPerson;
	}
	public void setAllotPerson(Person allotPerson) {
		this.allotPerson = allotPerson;
	}
	public Date getBeginTime() {
		return beginTime;
	}
	public void setBeginTime(Date beginTime) {
		this.beginTime = beginTime;
	}
	public Date getEndTime() {
		return endTime;
	}
	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	public String getAttach() {
		return attach;
	}
	public void setAttach(String attach) {
		this.attach = attach;
	}
	public String getLevel() {
		return level;
	}
	public void setLevel(String level) {
		this.level = level;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getAwoke() {
		return awoke;
	}
	public void setAwoke(String awoke) {
		this.awoke = awoke;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public void setCreattime(Date creattime) {
		this.creattime = creattime;
	}
	public Date getCreattime() {
		return creattime;
	}
	public Set<Document> getDocs() {
		return docs;
	}
	public void setDocs(Set<Document> docs) {
		this.docs = docs;
	}
	
}
